import React, { Component } from 'react';
import './index.css'

export default
  // Item组件--所有格子的操作都可以在此进行，如果这些操作都能与"activedId"关联就更好了
  class RowItem extends Component {
  render() {
    const { content, activedId } = this.props;
    return (
      <div className={activedId === content.id ? 'row__item row__item-active' : 'row__item'} id={`row_item_${content.id}`}>
        {
          content.title &&
          <div className='thx'>{content.title}</div>
        }
        {
          content.money &&
          <div>
            <div className='money_bg'>{content.money}</div>
            <div className='desp'> 现金{content.money}元</div>
          </div>
        }

      </div>
    )
  }
}